<?php
/**
 * 系統名稱: Lotto 系統
 * 檔案說明: 專案管理-修改
 * $Author$
 * $Id$
 *
 */
include_once("../config.inc.php");

include_once(__Member_Path."/logincheck.php");
include_once(__Language_Path."/selectlanguage_member.php");
include_once(__Common_Path."/marquee/Marquee1_".$_intLang.".php");

$strTemplateFile = __Membertemplate_Path."/mem_msg.html";

$fp = @file($strTemplateFile);
$fp = implode("", $fp);
$fp = setHTMLCharset($fp);

$strCon = "";
preg_match("/<!-- @ News Start @ \/\/-->(.+)<!-- @ News End @ \/\/-->/s", $fp, $arrMatch);

if(sizeof($Marquee) > 0){
	foreach($Marquee as $arrMq){
		$strTmp = $arrMatch[1];
		if(!preg_match("/,".$_SESSION["Member_Info"] -> SpGroup.",/", ",".$arrMq["SpGroup"].","))continue;
		//若是系統資訊，則此訊息忽略
		if($arrMq["isSystem"] == "1")continue;

		$arrMq["Content"] = str_replace(chr(10), "", $arrMq["Content"]);
		$arrMq["Content"] = str_replace(chr(13), "", $arrMq["Content"]);
		$arrMq["Content"] = preg_replace('/<br[^<>]+>/', "", $arrMq["Content"]);
		$strTmp = str_replace("{NewsList}", $arrMq["Content"], $strTmp);

		if($arrMq["isPopup"] == "1"){
			$strTmp = str_replace("rull_dotb", "rull_dotr", $strTmp);
		}
		$strCon .= $strTmp."\n";
	}
}

$fp = preg_replace("/<!-- @ News Start @ \/\/-->(.+)<!-- @ News End @ \/\/-->/s", $strCon, $fp);
//輸出
WebOutputHTML($fp, 1);
?>